/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package oop;

/**
 *
 * @author Nguyen Minh Tan
 */
public class SimplePolymorphism {
    class BasePoly{
        public void inratest(){
            System.out.print("Base\n");
        }
    }
    class DerivedPoly extends BasePoly{
        @Override
        public void inratest(){
            System.out.print("Derived\n");
        }
    }
    public static void main(String args[]){
        SimplePolymorphism test = new SimplePolymorphism();
        DerivedPoly derivepo = test.new DerivedPoly();
        derivepo.inratest();
        BasePoly basepo = test.new DerivedPoly();
        basepo.inratest();//Java la` ngon ngu dynamic binding len , mac. dinh. se~ goi. phuong thuc' lop' dan xuat
    }
}
/*
Derived
Derived
 * */